import { createApp } from "vue"
import { createPinia } from "pinia"
import { router } from "@/router/index"
import copy from "@/utils/copy"
import "animate.css"
import App from "./App.vue"
import { v } from "@/directive/sec2"
const pinia = createPinia()
const app = createApp(App)
import { addLine } from "./utils/addLine"
import * as Icons from "@element-plus/icons-vue"
app.config.globalProperties.$Copy = copy
for (const e of v) {
  app.directive(e.name, e.directive)
}
app.use(pinia).use(router).mount("#app")
// 遍历全局注册图标
for (const key in Icons) {
  app.component(`el-icon-${addLine(key)}`, (Icons as any)[key])
  app.component(key, Icons[key as keyof typeof Icons])
}
